package com.github.phoenics.militia.bazookaFx.model;

import javafx.beans.property.LongProperty;
import javafx.beans.property.SimpleLongProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * @author Phoenics Chow
 * on 2019年02月12日
 */
public class AppLinkModel implements IModel {
    private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(AppLinkModel.class);

    @Override
    public void clear() {
        id.setValue(null);
        appName.setValue(null);
        driverClassName.setValue(null);
        url.setValue(null);
        username.setValue(null);
        password.setValue(null);
        dbType.setValue(null);
        schemaName.setValue(null);

    }

    private LongProperty id=new SimpleLongProperty();

    /**
     * app 名称
     */
    private StringProperty appName=new SimpleStringProperty();

    /**
     * 数据库驱动
     */
    private StringProperty driverClassName=new SimpleStringProperty();

    /**
     * 连接url
     */
    private StringProperty url=new SimpleStringProperty();

    /**
     * 用户名
     */
    private StringProperty username=new SimpleStringProperty();

    /**
     * 密码
     */
    private StringProperty password=new SimpleStringProperty();
    private StringProperty dbType=new SimpleStringProperty();
    private StringProperty schemaName=new SimpleStringProperty();


    public long getId() {
        return id.get();
    }

    public LongProperty idProperty() {
        return id;
    }

    public void setId(long id) {
        this.id.set(id);
    }

    public String getAppName() {
        return appName.get();
    }

    public StringProperty appNameProperty() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName.set(appName);
    }

    public String getDriverClassName() {
        return driverClassName.get();
    }

    public StringProperty driverClassNameProperty() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName.set(driverClassName);
    }

    public String getUrl() {
        return url.get();
    }

    public StringProperty urlProperty() {
        return url;
    }

    public void setUrl(String url) {
        this.url.set(url);
    }

    public String getUsername() {
        return username.get();
    }

    public StringProperty usernameProperty() {
        return username;
    }

    public void setUsername(String username) {
        this.username.set(username);
    }

    public String getPassword() {
        return password.get();
    }

    public StringProperty passwordProperty() {
        return password;
    }

    public void setPassword(String password) {
        this.password.set(password);
    }

    public String getDbType() {
        return dbType.get();
    }

    public StringProperty dbTypeProperty() {
        return dbType;
    }

    public void setDbType(String dbType) {
        this.dbType.set(dbType);
    }

    public String getSchemaName() {
        return schemaName.get();
    }

    public StringProperty schemaNameProperty() {
        return schemaName;
    }

    public void setSchemaName(String schemaName) {
        this.schemaName.set(schemaName);
    }


}
